package com.yxy.springcloud.framework.unionauth.dao;

import com.yxy.springcloud.framework.common.base.MyMapper;
import com.yxy.springcloud.framework.unionauth.model.App;
import com.yxy.springcloud.framework.unionauth.model.Tenant;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TenantMapper extends MyMapper<Tenant> {
  // 获取某个租户关联的app列表
  List<App> getAppListWithTenant(@Param("tenantId") Long tenantId);

  // 删除过时的人tenant app对应关系
  void deleteAppTenantRelation(@Param("tenantId") Long tenantId, @Param("newAppIdList") String[] newAppIdList);
}
